#include<iostream>
#include<cstdlib>
#include<ctime>
int n=4; 
using namespace std;
int main()
{
   int i,j;
   int a[n][n],b[n][n];
   srand((unsigned)time(NULL));
   for(i=0;i<4;i++)
   {
        for(j=0;j<4;j++)
        { 
            a[i][j]=rand()%100;
			cout<<a[i][j]<<"\t"; 
        }
         cout<<"\n";
	}
   for(i=0;i<4;i++)
        for(j=0;j<4;j++)
            b[j][3-i]=a[i][j];
    for(i=0;i<4;i++)
   {
        for(j=0;j<4;j++)
            cout<<b[i][j]<<" ";
        cout<<endl;
    }
return 0;
 } 

